package qsc.designpattern.singleton;

/**
 * 静态内部类实现饿汉式单例
 */
public class Singleton {
  private Singleton(){}

  public static class HolderClass{
      private final static Singleton instance = new Singleton();
  }

  private static Singleton getInstance(){
      return HolderClass.instance;
    }
}
